package com.jiadakeji.ppm.modules.weixin.entity;



import com.jiadakeji.ppm.common.utils.CDataAdapter;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.io.Serializable;

/**
 * 微信统下单响应对象
 *
 * @Author xuelongjiang
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "xml")//解析xml的根元素
public class WechatUnifiedorderResponse  implements Serializable{

    @XmlJavaTypeAdapter(CDataAdapter.class)// 解析<![CDATA[]]>
    private String return_code; //返回状态码

    @XmlJavaTypeAdapter(CDataAdapter.class)
    private String return_msg; // 返回信息

     //一下字段在return_code为success的时候有返回
     @XmlJavaTypeAdapter(CDataAdapter.class)
    private String appid; //服务商ID

    @XmlJavaTypeAdapter(CDataAdapter.class)
    private String mch_id;//商户号

    @XmlJavaTypeAdapter(CDataAdapter.class)
    private String sub_appid;//小程序的appid//注意：在扫码方式下可以不填

    @XmlJavaTypeAdapter(CDataAdapter.class)
    private String sub_mch_id; //子商户号

    @XmlJavaTypeAdapter(CDataAdapter.class)
    private String device_info; //设备号

    @XmlJavaTypeAdapter(CDataAdapter.class)
    private String nonce_str;//随机字符串

    @XmlJavaTypeAdapter(CDataAdapter.class)
    private String sign;//签名

    @XmlJavaTypeAdapter(CDataAdapter.class)
    private String result_code;// 业务结果

    @XmlJavaTypeAdapter(CDataAdapter.class)
    private  String err_code;// 错误代码

    @XmlJavaTypeAdapter(CDataAdapter.class)
    private String err_code_des;// 错误代码描述

    public String getCode_url() {
        return code_url;
    }

    public void setCode_url(String code_url) {
        this.code_url = code_url;
    }

    //以下字段在return_code 和result_code都为success的时候有返回
    @XmlJavaTypeAdapter(CDataAdapter.class)

    private String trade_type;// 交易类型

    @XmlJavaTypeAdapter(CDataAdapter.class)
    private String prepay_id;//预支付交易会话标识

    @XmlJavaTypeAdapter(CDataAdapter.class)
    private String code_url;//二维码链接 扫码是返回


    public String getReturn_code() {
        return return_code;
    }

    public void setReturn_code(String return_code) {
        this.return_code = return_code;
    }

    public String getReturn_msg() {
        return return_msg;
    }

    public void setReturn_msg(String return_msg) {
        this.return_msg = return_msg;
    }

    public String getAppid() {
        return appid;
    }

    public void setAppid(String appid) {
        this.appid = appid;
    }

    public String getMch_id() {
        return mch_id;
    }

    public void setMch_id(String mch_id) {
        this.mch_id = mch_id;
    }

    public String getSub_appid() {
        return sub_appid;
    }

    public void setSub_appid(String sub_appid) {
        this.sub_appid = sub_appid;
    }

    public String getSub_mch_id() {
        return sub_mch_id;
    }

    public void setSub_mch_id(String sub_mch_id) {
        this.sub_mch_id = sub_mch_id;
    }

    public String getDevice_info() {
        return device_info;
    }

    public void setDevice_info(String device_info) {
        this.device_info = device_info;
    }

    public String getNonce_str() {
        return nonce_str;
    }

    public void setNonce_str(String nonce_str) {
        this.nonce_str = nonce_str;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }

    public String getResult_code() {
        return result_code;
    }

    public void setResult_code(String result_code) {
        this.result_code = result_code;
    }

    public String getErr_code() {
        return err_code;
    }

    public void setErr_code(String err_code) {
        this.err_code = err_code;
    }

    public String getErr_code_des() {
        return err_code_des;
    }

    public void setErr_code_des(String err_code_des) {
        this.err_code_des = err_code_des;
    }

    public String getTrade_type() {
        return trade_type;
    }

    public void setTrade_type(String trade_type) {
        this.trade_type = trade_type;
    }

    public String getPrepay_id() {
        return prepay_id;
    }

    public void setPrepay_id(String prepay_id) {
        this.prepay_id = prepay_id;
    }
}
